<?php
/**
 * Created by PhpStorm.
 * User: hualei
 * Date: 2015/5/32
 * Time: 10:44
 */
namespace app\modules\h5cargo\controllers;
use Yii;
use yii\web\Controller;
use yii\helpers\Url;
class AuthController extends Controller
{
   function  __construct($id, $module, $config = []){
       //var_dump(Yii::$app->getRequest()->url);exit;
       if(!isset($_COOKIE['id'])){
           //vae
           $return_url = Yii::$app->getRequest()->url;
           $this->redirect(Url::to(['/h5cargo/nologinindex/login']).'?return_url='.$return_url);
           //$this->redirect(Url::to(['/h5cargo/login/login']).'?return_url='.$return_url);
       }
       parent::__construct($id, $module, $config = []);
   }

}